// 对路由、菜单所公用的数据，做集中的自定义管理
import {
  DesktopOutlined,
  FileOutlined,
  PieChartOutlined,
  TeamOutlined,
  UserOutlined,
} from '@ant-design/icons';
import {IMenuType} from './index.d'
import Student from '../views/Student';
import Safe from '../views/Safe';
import Manager from '../views/Manager';
import Login from '../views/Login';
import Role from '../views/Manager/Role';
import User from '../views/Manager/User';
import StudentPublic from '../views/Student/pub';
import StudentEdit from '../views/Student/edit';

//直接用于菜单渲染
//将带有children的数据处理后，才能用于Route渲染
export const mainRoutes: IMenuType[] = [
  {
    key:'/student',
    label:'学员管理',
    icon:<UserOutlined/>,
    element:<Student/>
  },
  {
    key:'/student/pub',
    label:'新增学员',
    icon:<UserOutlined/>,
    element:<StudentPublic/>
  },
  {
    key:'/student/edit',
    label:'编辑学员',
    icon:<UserOutlined/>,
    element:<StudentEdit/>
  },
  {
    key:'/safe',
    label:'安全管理',
    icon:<DesktopOutlined/>,
    element:<Safe/>
  },
  {
    key:'/manager',
    label:'权限管理',
    icon:<TeamOutlined/>,
    element:<Manager/>,
    children:[
      {
        key:'/manager/role',
        label:'角色管理',
        // icon:<TeamOutlined/>,
        element:<Role/>
      },
      {
        key:'/manager/user',
        label:'账号管理',
        // icon:<TeamOutlined/>,
        element:<User/>
      },
    ]
  },
  
];

